<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html{
            scroll-behavior: smooth;
        }

        body{
            height: 2000px;
            background-image: linear-gradient(to bottom, red, blue);
        }

        .back-top{
            width: 70px;
            height: 50px;
            background-color: rgb(151, 148, 148);
            position: fixed;
            text-align: center;
            line-height: 50px;
            right: 5px;
            bottom: 30px;
            color: white;
            text-decoration: none;
        }

        .back-top:hover{
            background-color: gold;
            color: black;
        }
    </style>
</head>
<body id="top">
    <a href="#top" class="back-top">
        返回顶部
    </a>
</body>
</html>